package com.abcdefg.webpagechatprojectbymyself.mapper;

import com.abcdefg.webpagechatprojectbymyself.model.Message;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MessageMapper {
    //根据sessionId 获取最新的消息
    String getLastMessageBySessionId(Integer sessionId);
    //根据sessionId 获取消息
    List<Message> getMessageBySessionId(Integer sessionId);
    //向message种插入数据
    int insertMessage(Message message);
}
